#include "Estep.h"
#include "callbacks.h"

void
estep_cb_quit(Ecore_Evas *ee)
{
	ecore_main_loop_quit();
}

void
estep_cb_mouse_in(Ecore_Evas *ee)
{
	Evas_Object *gui;
	gui = evas_object_name_find(ecore_evas_get(ee), "gui");
	edje_object_signal_emit(gui, "estep,enter", "Estep");
}

void
estep_cb_mouse_out(Ecore_Evas *ee)
{
	Evas_Object *gui;
	gui = evas_object_name_find(ecore_evas_get(ee), "gui");
	edje_object_signal_emit(gui, "estep,leave", "Estep");
}

void
estep_cb_configure(Ecore_Evas *ee)
{
	int w, h;
	Evas_Object *gui, *drag;

	ecore_evas_geometry_get(ee, NULL, NULL, &w, &h);

	gui = evas_object_name_find(ecore_evas_get(ee), "gui");
	drag = evas_object_name_find(ecore_evas_get(ee), "drag");

	evas_object_resize(gui, w, h);
	evas_object_resize(drag, w, h);
}

void
estep_cb_speed_up(void *data, Evas_Object *o, const char *sig,
							const char *src)
{
	Estep *es = data;

	/* timer interval, etc */
	printf("speed up\n");
}

void
estep_cb_speed_down(void *data, Evas_Object *o, const char *sig,
							const char *src)
{
	Estep *es = data;

	/* timer interval, etc */
	printf("slow down\n");
}
void
estep_cb_dir_forwards(void *data, Evas_Object *o, const char *sig,
							const char *src)
{
	Estep *es = data;

	es->direction = 1;
	printf("go forwards\n");
}
void
estep_cb_dir_reverse(void *data, Evas_Object *o, const char *sig,
							const char *src)
{
	Estep *es = data;

	es->direction = -1;
	printf("go backwards\n");
}
void
estep_cb_change_state(void *data, Evas_Object *o, const char *sig,
							const char *src)
{
	Estep *es = data;

	/* timer etc */
	printf("start/stop\n");
}
